<?php

namespace app\enum;

use core\enum\EnumInterface;

enum OrganizationType: int implements EnumInterface
{
    case TYPE_COMPANY  = 1;
    case TYPE_DEPARTMENT = 2;

    public function title(): string
    {
        return match ($this) {
            OrganizationType::TYPE_COMPANY => '单位',
            OrganizationType::TYPE_DEPARTMENT => '部门',
        };
    }

    public function color(): string
    {
        return match ($this) {
            OrganizationType::TYPE_COMPANY => '#0a6aff',
            OrganizationType::TYPE_DEPARTMENT => '#a86d00',
        };
    }
}
